<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <title>跳转提示</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        a{
            color: #46a7b7;
        }
        .container{
            width: 748px;
            padding-top: 50px;
            margin: auto;
        }
        @media screen and ( max-width: 748px ){
            .container{
                width: 100%;
            }
        }
        .title{
            text-align: center;
            margin-bottom: 30px;
        }
        .success{
            color: #3cb53c;
        }
        .error{
            color: #ff8300;
        }
        .jump-auto{
            text-align: center;
        }
    
    </style>
</head>
<body>
<div class="container">
    <?php if(isset($message)) {?>
    <h2 class="title success"><?php echo($message); ?></h2>
    <?php }else{?>
    <h2 class="title error"><?php echo($error); ?></h2>
    <?php }?>
    <div class="content">
        <p class="jump-auto"><a id="href" href="<?php echo($jumpUrl); ?>">页面自动跳转：<span id="wait"><?php echo($waitSecond); ?></span>S</a></p>
    </div>
</div>
<script type="text/javascript">
    (function(){
        var wait = document.getElementById('wait'),href = document.getElementById('href').href;
        var interval = setInterval(function(){
            var time = --wait.innerHTML;
            if(time <= 0) {
                location.href = href;
                clearInterval(interval);
            }
        }, 1000);
    })();
</script>
</body>
</html>
